<?php
if(!isset($q)){
	$q='';
}else{
	$q="&q=$q";
}
$paginator->options(array('url'=>array('?'=>'limite='.$limite.''.$q)));
?>
<?php $javascript->link(array('index_only.js'), false); ?>
<h2>Cierres diarios</h2>
<?php
echo $getList->getList(array(
    'Cierre',array(
        'form'=>array('action'=>'process','type'=>'post'),
        'table'=>array('class'=>'celda','border'=>'0'),
        'config'=>array(
            '[Cierre][id]'=>array('type'=>'hidden','key'=>true ),
            '[id]'=>array('type'=>'checkbox','title'=>'','width'=>20),
            '[Ejercicio][codigo]'=>array('type'=>'fields','title'=>'Año','width'=>40,'align'=>'center'),
            '[Periodo][codigo]'=>array('type'=>'fields','title'=>'Mes','width'=>30,'align'=>'center'),
            '[Cierre][dia]'=>array('type'=>'fields','title'=>'Dia','width'=>30,'align'=>'center'),
            '[Cierre][fecha]'=>array('type'=>'fields','title'=>'Fecha', 'datatype'=>'date','width'=>80,'align'=>'center'),
            '[Modulo][descripcion]'=>array('type'=>'fields','strong'=>true,'title'=>'Modulo'),
            '[CentroDist][descripcion_corta]'=>array('type'=>'fields','title'=>'Centro Dist.'),
            '[Apertura]'=>array(
                'type'=>'button',
                'href'=>array('action'=>'apertura'),
                'title'=>'',
                'class'=>'lnkbutton btnpermissions',
                'order'=>false,
                'width'=>80

            ),
        ),
        'data'	=>$cierres,
        'adition'=>array('find'=>true,'paginator'=>true),
        'button'=>array(
            'default'=>false,
            'Volver'=>array(
                'type'=>'link',
                'div' => false,
                'value'	=>true,
                'url'	=>array('controller'=>'Home','action'=>'index'),
                'class'	=>'lnkbutton btnback'
            ),
            'Nuevo'=>array(
                'type'=>'link',
                'div' => false,
                'value'	=>true,
                'url'	=>array('action'=>'add'),
                'class'	=>'lnkbutton btnnew'
            )
        )
    )
));
?>